package org.blankhole.model;

/**
 * Article: the article model
 *
 * @author Wenlong Meng(wenlong.meng@gmail.com)
 * @version 1.0 at 2012/07/31
 * @since 1.0
 */
public class Article extends Model {

	//local variables
	/**
	 * the name of article
	 */
	private String name;
	/**
	 * the type of article
	 */
	private Type type;
	/**
	 * the comment of article
	 */
	private String comment;
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -4417677468624471067L;
	
	//Setter and Getter
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * @return the type
	 */
	public Type getType() {
		return type;
	}
	/**
	 * @param type the type to set
	 */
	public void setType(Type type) {
		this.type = type;
	}
	
	/**
	 * @return the comment
	 */
	public String getComment() {
		return comment;
	}
	/**
	 * @param comment the comment to set
	 */
	public void setComment(String comment) {
		this.comment = comment;
	}

	//Inner class
	/**
	 * Type: the type of article
	 *
	 * @author Wenlong Meng(wenlong.meng@gmail.com)
	 * @version 1.0 at 2012/07/31
	 * @since 1.0
	 */
	public static enum Type {
		PPT,
		PDF,
		TXT,
		WORD,
		HTML
	}

	//toString
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Article [name=" + name + ", type=" + type + ", comment="
				+ comment + ", id=" + id + ", createDate=" + createDate
				+ ", updateDate=" + updateDate + ", version=" + version + "]";
	}

}
